import selfAxios from '@/utils/selfAxios.js';

//验证用户信息
export function login(username, password) {
    return selfAxios({
        url: '/user/login',
        method: 'post',
        data: {
            username, //username:username
            password
        }
    });
}
//获取用户信息
export function getUserInfo(token) {
    return selfAxios({
        url: `/user/info/${token}`,
        method: 'get'
    })
}
// 退出登录系统
export function logOut(token) {
    return selfAxios({
        url: `/user/logout`,
        method: 'post',
        data: {
            token //
        }
    })
}